package heven.holt.library.binding

import android.view.View
import androidx.databinding.BindingAdapter

@BindingAdapter("android:gone")
fun setVisibleOrGone(view: View, gone: Boolean) {
    view.visibility = if (gone) View.GONE else View.VISIBLE
}

@BindingAdapter("android:gone")
fun setVisibleOrGone(view: View, gone: String?) {
    setVisibleOrGone(view, gone.isNullOrEmpty())
}